<template>
  <div class="category">
    <h3>{{ title }}分类</h3>
    <slot :games="games">我是默认值，没有内容的时候我出现</slot>
  </div>
</template>

<script>
export default {
  name: "Category",
  data() {
    return {
      games: ["使命召唤", "英雄联盟", "穿越火线", "王者荣耀"],
    };
  },
  props: ["title"],
  components: {},
  mounted() {},
  methods: {},
};
</script>

<style scoped>
.category {
  margin-top: 40px;
  background-color: rgb(189, 190, 196);
  width: 200px;
  height: 300px;
}
h3 {
  text-align: center;
  background: rgb(238, 158, 158);
}
img {
  justify-content: space-around;
  display: flex;
  width: 100%;
}
</style>
